package com.wp.controller;

import com.wp.vo.Result;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author: WangPeng
 * @createTime: 2023/01/03 11:38
 * @description:
 * @version: v1.0
 */
@RestController
@RequestMapping("/user")
public class UserController {

    @GetMapping("/insert")
    @PreAuthorize("hasAuthority('user:insert')")
    public Result insert(){
        return  new Result(200,"汪鹏添加用户的操作");
    }

    @GetMapping("/delete")
    @PreAuthorize("hasAuthority('user:delete')")
    public Result delete(){
        return  new Result(200,"汪鹏删除用户的操作");
    }

    @GetMapping("/update")
    @PreAuthorize("hasAuthority('user:update')")
    public Result update(){
        return  new Result(200,"汪鹏修改用户的操作");
    }

    @GetMapping("/query")
    @PreAuthorize("hasAuthority('user:query')")
    public Result query(){
        return  new Result(200,"汪鹏查询用户的操作");
    }

    @GetMapping("/export")
    @PreAuthorize("hasAuthority('user:export')")
    public Result export(){
        return  new Result(200,"汪鹏导出用户的操作");
    }
}
